package com.example.piedrapapeltijeralagartospock;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;

public class MenuInformacion extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_menu_informacion);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.menu, menu);
		return true;
	}
	
	public boolean onOptionsItemSelected(MenuItem item) {
	    // Handle item selection
		 Intent intent = new Intent(this,MenuRecord.class);
	   try{
	    switch (item.getItemId()) {
	    case R.id.menuReglas:            
	        startActivity(new Intent(this,MenuReglas.class));
	        break;  
	    case R.id.menuReglasGraficas:            
	        startActivity(new Intent(this,MenuReglasGraficas.class));
	        break;
	    case R.id.menuReglasVideo:            
	    	startActivity(new Intent(this,MenuReglasVideo.class));
	        break;
	    case R.id.menuInformacion:            
	        startActivity(new Intent(this,MenuInformacion.class));
	        break;
	    case R.id.menu2ficherotxt:            
	        intent.putExtra("ModoCarga", 1);
	        startActivity(intent);
	        break;
	    case R.id.menu2ficherobin:    
	    	intent.putExtra("ModoCarga", 2);
	        startActivity(intent);
	        break;
	    case R.id.menu2ficheroxml:
	    	intent.putExtra("ModoCarga", 3);
	        startActivity(intent);
	        break;
	    case R.id.menu2basesql: 
	    	intent.putExtra("ModoCarga", 4);
	        startActivity(intent);
	        break;
	    default:
	        return super.onOptionsItemSelected(item);
	    }
	   }catch(Exception e){
		   Log.i("PiedraPapelMenu", e.getMessage(), e);
	   }
	   return true;
	}
}
